<?php
/**
 * Created by PhpStorm.
 * User: ybjaa
 * Date: 2017/7/11
 * Time: 15:05
 */

namespace App\Business\DataLog;


use App\Jobs\LogQueue;

class DataBaseStatic
{
    private static $arraySQL=[];

    public static function AddSQL($sql)
    {
        self::$arraySQL[]=$sql;
    }

    public static function GetLogQueues()
    {
        $log=null;


        $sql=null;

        while (count(self::$arraySQL)>0)
        {
            $sql= array_shift(self::$arraySQL);
            $log=new DataBase();
            $log->query=$sql;
            dispatch(new LogQueue($log));
        }
    }





}